3.75 \(\int \frac{(a+b \log (c x^n)) \log (d (e+f x)^m)}{x^2} \, dx\)

Optimal. Leaf size=164 \[ \frac{b f m n \text{PolyLog}\left (2,\frac{f x}{e}+1\right )}{e}-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+\frac{f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac{f m \log (e+f x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac{b n \log \left (d (e+f x)^m\right )}{x}-\frac{b f m n \log ^2(x)}{2 e}+\frac{b f m n \log (x)}{e}-\frac{b f m n \log (e+f x)}{e}+\frac{b f m n \log \left (-\frac{f x}{e}\right ) \log (e+f x)}{e} \]

[Out]

(b*f*m*n*Log[x])/e - (b*f*m*n*Log[x]^2)/(2*e) + (f*m*Log[x]*(a + b*Log[c*x^n]))/e - (b*f*m*n*Log[e + f*x])/e +
 (b*f*m*n*Log[-((f*x)/e)]*Log[e + f*x])/e - (f*m*(a + b*Log[c*x^n])*Log[e + f*x])/e - (b*n*Log[d*(e + f*x)^m])
/x - ((a + b*Log[c*x^n])*Log[d*(e + f*x)^m])/x + (b*f*m*n*PolyLog[2, 1 + (f*x)/e])/e

________________________________________________________________________________________

Rubi [A]  time = 0.117522, antiderivative size = 164, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 8, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {2395, 36, 29, 31, 2376, 2301, 2394, 2315} \[ \frac{b f m n \text{PolyLog}\left (2,\frac{f x}{e}+1\right )}{e}-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+\frac{f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac{f m \log (e+f x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac{b n \log \left (d (e+f x)^m\right )}{x}-\frac{b f m n \log ^2(x)}{2 e}+\frac{b f m n \log (x)}{e}-\frac{b f m n \log (e+f x)}{e}+\frac{b f m n \log \left (-\frac{f x}{e}\right ) \log (e+f x)}{e} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])*Log[d*(e + f*x)^m])/x^2,x]

[Out]

(b*f*m*n*Log[x])/e - (b*f*m*n*Log[x]^2)/(2*e) + (f*m*Log[x]*(a + b*Log[c*x^n]))/e - (b*f*m*n*Log[e + f*x])/e +
 (b*f*m*n*Log[-((f*x)/e)]*Log[e + f*x])/e - (f*m*(a + b*Log[c*x^n])*Log[e + f*x])/e - (b*n*Log[d*(e + f*x)^m])
/x - ((a + b*Log[c*x^n])*Log[d*(e + f*x)^m])/x + (b*f*m*n*PolyLog[2, 1 + (f*x)/e])/e

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2376

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((g_.)*(x_))^(q_.), x_Sym
bol] :> With[{u = IntHide[(g*x)^q*Log[d*(e + f*x^m)^r], x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[Dist
[1/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q + 1)/m] || (RationalQ[m] &
& RationalQ[q])) && NeQ[q, -1]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x^2} \, dx &=\frac{f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac{f m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{e}-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}-(b n) \int \left (\frac{f m \log (x)}{e x}-\frac{f m \log (e+f x)}{e x}-\frac{\log \left (d (e+f x)^m\right )}{x^2}\right ) \, dx\\ &=\frac{f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac{f m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{e}-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+(b n) \int \frac{\log \left (d (e+f x)^m\right )}{x^2} \, dx-\frac{(b f m n) \int \frac{\log (x)}{x} \, dx}{e}+\frac{(b f m n) \int \frac{\log (e+f x)}{x} \, dx}{e}\\ &=-\frac{b f m n \log ^2(x)}{2 e}+\frac{f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}+\frac{b f m n \log \left (-\frac{f x}{e}\right ) \log (e+f x)}{e}-\frac{f m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{e}-\frac{b n \log \left (d (e+f x)^m\right )}{x}-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+(b f m n) \int \frac{1}{x (e+f x)} \, dx-\frac{\left (b f^2 m n\right ) \int \frac{\log \left (-\frac{f x}{e}\right )}{e+f x} \, dx}{e}\\ &=-\frac{b f m n \log ^2(x)}{2 e}+\frac{f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}+\frac{b f m n \log \left (-\frac{f x}{e}\right ) \log (e+f x)}{e}-\frac{f m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{e}-\frac{b n \log \left (d (e+f x)^m\right )}{x}-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+\frac{b f m n \text{Li}_2\left (1+\frac{f x}{e}\right )}{e}+\frac{(b f m n) \int \frac{1}{x} \, dx}{e}-\frac{\left (b f^2 m n\right ) \int \frac{1}{e+f x} \, dx}{e}\\ &=\frac{b f m n \log (x)}{e}-\frac{b f m n \log ^2(x)}{2 e}+\frac{f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac{b f m n \log (e+f x)}{e}+\frac{b f m n \log \left (-\frac{f x}{e}\right ) \log (e+f x)}{e}-\frac{f m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{e}-\frac{b n \log \left (d (e+f x)^m\right )}{x}-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+\frac{b f m n \text{Li}_2\left (1+\frac{f x}{e}\right )}{e}\\ \end{align*}

Mathematica [A]  time = 0.112692, size = 117, normalized size = 0.71 \[ -\frac{2 b f m n x \text{PolyLog}\left (2,-\frac{f x}{e}\right )+2 \left (a+b \log \left (c x^n\right )+b n\right ) \left (e \log \left (d (e+f x)^m\right )+f m x \log (e+f x)\right )-2 f m x \log (x) \left (a+b \log \left (c x^n\right )+b n \log (e+f x)-b n \log \left (\frac{f x}{e}+1\right )+b n\right )+b f m n x \log ^2(x)}{2 e x} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])*Log[d*(e + f*x)^m])/x^2,x]

[Out]

-(b*f*m*n*x*Log[x]^2 + 2*(a + b*n + b*Log[c*x^n])*(f*m*x*Log[e + f*x] + e*Log[d*(e + f*x)^m]) - 2*f*m*x*Log[x]
*(a + b*n + b*Log[c*x^n] + b*n*Log[e + f*x] - b*n*Log[1 + (f*x)/e]) + 2*b*f*m*n*x*PolyLog[2, -((f*x)/e)])/(2*e
*x)

________________________________________________________________________________________

Maple [C]  time = 0.309, size = 1892, normalized size = 11.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*ln(d*(f*x+e)^m)/x^2,x)

[Out]

-1/2*I/x*Pi*ln(d)*b*csgn(I*c)*csgn(I*c*x^n)^2-1/2*I/x*Pi*ln(d)*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I/x*Pi*b*n*cs
gn(I*d)*csgn(I*d*(f*x+e)^m)^2-1/2*I/x*Pi*b*n*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)^2-1/2*I*Pi*csgn(I*(f*x+e)^m
)*csgn(I*d*(f*x+e)^m)^2*b/x*ln(x^n)-1/2*I/x*ln(c)*Pi*b*csgn(I*d)*csgn(I*d*(f*x+e)^m)^2-1/2*I/x*ln(c)*Pi*b*csgn
(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)^2-1/x*ln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n)-1/4*Pi^2*csgn(I*d)*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)/x*b*csgn(I*c)*csg
n(I*c*x^n)^2-1/4*Pi^2*csgn(I*d)*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)/x*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*Pi^2
*csgn(I*d)*csgn(I*d*(f*x+e)^m)^2/x*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-1/2*I*f*m/e*ln(x)*b*Pi*csgn(I*c*x^n)^
3+1/2*I*f*m/e*ln(f*x+e)*b*Pi*csgn(I*c*x^n)^3-1/2*I*f*m/e*ln(x)*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/2*I*
f*m/e*ln(f*x+e)*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/2*I/x*ln(c)*Pi*b*csgn(I*d)*csgn(I*(f*x+e)^m)*csgn(I
*d*(f*x+e)^m)+1/2*I/x*Pi*ln(d)*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/2*I/x*Pi*b*n*csgn(I*d)*csgn(I*(f*x+e)^m
)*csgn(I*d*(f*x+e)^m)+n*b*f*m/e*dilog(-f*x/e)

________________________________________________________________________________________

Maxima [A]  time = 1.64901, size = 269, normalized size = 1.64 \begin{align*} -\frac{{\left (\log \left (\frac{f x}{e} + 1\right ) \log \left (x\right ) +{\rm Li}_2\left (-\frac{f x}{e}\right )\right )} b f m n}{e} - \frac{{\left (a f m +{\left (f m n + f m \log \left (c\right )\right )} b\right )} \log \left (f x + e\right )}{e} + \frac{2 \, b f m n x \log \left (f x + e\right ) \log \left (x\right ) - b f m n x \log \left (x\right )^{2} - 2 \, a e \log \left (d\right ) + 2 \,{\left (a f m +{\left (f m n + f m \log \left (c\right )\right )} b\right )} x \log \left (x\right ) - 2 \,{\left (e n \log \left (d\right ) + e \log \left (c\right ) \log \left (d\right )\right )} b - 2 \,{\left (b e \log \left (x^{n}\right ) +{\left (e n + e \log \left (c\right )\right )} b + a e\right )} \log \left ({\left (f x + e\right )}^{m}\right ) - 2 \,{\left (b f m x \log \left (f x + e\right ) - b f m x \log \left (x\right ) + b e \log \left (d\right )\right )} \log \left (x^{n}\right )}{2 \, e x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x+e)^m)/x^2,x, algorithm="maxima")

[Out]

-(log(f*x/e + 1)*log(x) + dilog(-f*x/e))*b*f*m*n/e - (a*f*m + (f*m*n + f*m*log(c))*b)*log(f*x + e)/e + 1/2*(2*
b*f*m*n*x*log(f*x + e)*log(x) - b*f*m*n*x*log(x)^2 - 2*a*e*log(d) + 2*(a*f*m + (f*m*n + f*m*log(c))*b)*x*log(x
) - 2*(e*n*log(d) + e*log(c)*log(d))*b - 2*(b*e*log(x^n) + (e*n + e*log(c))*b + a*e)*log((f*x + e)^m) - 2*(b*f
*m*x*log(f*x + e) - b*f*m*x*log(x) + b*e*log(d))*log(x^n))/(e*x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (b \log \left (c x^{n}\right ) + a\right )} \log \left ({\left (f x + e\right )}^{m} d\right )}{x^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x+e)^m)/x^2,x, algorithm="fricas")

[Out]

integral((b*log(c*x^n) + a)*log((f*x + e)^m*d)/x^2, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*ln(d*(f*x+e)**m)/x**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left (c x^{n}\right ) + a\right )} \log \left ({\left (f x + e\right )}^{m} d\right )}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x+e)^m)/x^2,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*log((f*x + e)^m*d)/x^2, x)